/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "INTERES", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Interes.findAll", query = "SELECT i FROM Interes i"), @NamedQuery(name = "Interes.findByIdInteres", query = "SELECT i FROM Interes i WHERE i.idInteres = :idInteres"), @NamedQuery(name = "Interes.findByTipoInteres", query = "SELECT i FROM Interes i WHERE i.tipoInteres = :tipoInteres"), @NamedQuery(name = "Interes.findByMensual", query = "SELECT i FROM Interes i WHERE i.mensual = :mensual")})
public class Interes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_INTERES", nullable = false, precision = 22)
    private BigDecimal idInteres;
    @Basic(optional = false)
    @Column(name = "TIPO_INTERES", nullable = false, length = 2)
    private String tipoInteres;
    @Basic(optional = false)
    @Column(name = "MENSUAL", nullable = false)
    private char mensual;

    public Interes() {
    }

    public Interes(BigDecimal idInteres) {
        this.idInteres = idInteres;
    }

    public Interes(BigDecimal idInteres, String tipoInteres, char mensual) {
        this.idInteres = idInteres;
        this.tipoInteres = tipoInteres;
        this.mensual = mensual;
    }

    public BigDecimal getIdInteres() {
        return idInteres;
    }

    public void setIdInteres(BigDecimal idInteres) {
        this.idInteres = idInteres;
    }

    public String getTipoInteres() {
        return tipoInteres;
    }

    public void setTipoInteres(String tipoInteres) {
        this.tipoInteres = tipoInteres;
    }

    public char getMensual() {
        return mensual;
    }

    public void setMensual(char mensual) {
        this.mensual = mensual;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idInteres != null ? idInteres.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Interes)) {
            return false;
        }
        Interes other = (Interes) object;
        if ((this.idInteres == null && other.idInteres != null) || (this.idInteres != null && !this.idInteres.equals(other.idInteres))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Interes[idInteres=" + idInteres + "]";
    }

}
